
$(function(){
	$("#form-pricing").validate({
		rules: {
			name: {
				required: true
			},
			customer_email: {
				email: true
			},
			captcha: {
				required: true,
				minlength: 4,
				maxlength: 4
			}
		},
		messages: {
			name: {
				required: "请输入项目名"
			},
			customer_email: {
				email: "邮箱格式非法"
			},
			captcha: {
				required: "请输入验证码",
				minlength: "验证码最少需要输入4个字符",
				maxlength: "验证码最多可以输入4个字符"
			}
		}
	});
});



function addAttachment()
{
	jQuery("#attachments").append('<div class="attachment"><input type="file" name="attachment[]" /> <a href="javascript:;" onclick="javascript:jQuery(this).parent().remove();">- 移除</a></div>');	
}